package cn.hu.org.domain;

import cn.hu.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseDomain {
    private String sn;//部门编号
    private String name;//部门名称
    private String dirPath;//部门的上级分类层级id
    private Integer state;//部门状态，0正常，1禁用
    private Employee manager;//部门管理员
    private Long manager_id;//部门管理员id，关联Employee表id
    private Department parent;//上级部门
    private Long parent_id;//上级部门id
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children=new ArrayList<>();;
}
